-
Notifications
You must be signed in to change notification settings - Fork 62
Add async/await/sync/yield and toImport/ExportBuilder #46
Conversation
CHANGELOG.md
Outdated
| @@ -1,3 +1,9 @@ | |||
| ## 1.0.0-alpha+8 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+9 :)
| } | ||
|
|
||
| /// Various types of modifiers for methods. | ||
| class MethodModifier implements ValidMethodMember { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are things like static and final considered modifiers? I'm also wondering if package:meta should be supported out-of-the-box (as a separate feature request probably), for things like @protected and @mustCallSuper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so (I am just copying analyzer terminology though)
| /// Creates a new [MethodBuilder]. | ||
| factory MethodBuilder( | ||
| String name, { | ||
| MethodModifier modifier, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can a method have multiple modifiers? I'm not terribly versed in the Dart terminology, but in Java private, protected, static, final, etc are all considered "modifiers" and can be combined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static final or static const are valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just async/sync/* variant modifiers, since there are other ways to set them.
(And you can't just add static anywhere in Dart)
Acknowledged.
pubspec.yaml
Outdated
| @@ -1,5 +1,5 @@ | |||
| name: code_builder | |||
| version: 1.0.0-alpha+7 | |||
| version: 1.0.0-alpha+8 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+9
| ); | ||
| }); | ||
|
|
||
| test('should emit an async* method', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async* is not complete without a await for/in :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For loops/while loops in a future PR :)
…ode_builder#46) * Various changes. * Update presubmit. * Add async, await, yield * . * . * Update CHANGELOG.md * Update pubspec.yaml
1.0.0-alpha+8
async,sync,sync*functionsasAwait,asYield,asYieldStartoExportBuilderandtoImportBuilderto types and referencesCloses dart-lang/tools#964
Closes dart-lang/tools#965